﻿using System.Collections.Generic;

namespace CoreCms.Net.Caching.Configuration
{
    public class RedisCaacheOptions
    {
        internal static string RedisCacheSettings = "RedisCacheSettings";

        public RedisCaacheOptions()
        {
        }

        public List<RedisOption> RedisOptionsList { get; set; }
    }


    public class RedisOption
    {
        public RedisMode Mode { get; set; }

        /// <summary>
        /// 名称唯一标识
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 主地址（多地址个以;分割
        /// </summary>
        public string ServerAddress { get; set; }

        /// <summary>
        /// 从节点（多地址个以;分割
        /// </summary>
        public string SentinelAddress { get; set; }
    }

    public enum RedisMode
    {
        //普通模式
        Normal,
        //集群模式
        Cluster,
        //哨兵模式
        Sentinel,
        //主从模式
        Pooling
    }
}